<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户中心</title>
    <link href="../ace/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="../ace/assets/css/font-awesome.min.css" />
    <link rel="stylesheet" href="../ace/assets/css/ace.min.css" />
    <link rel="stylesheet" href="../ace/assets/css/ace-rtl.min.css" />
    <link rel="stylesheet" href="../ace/assets/css/ace-skins.min.css"/>
    <link rel="stylesheet" type="text/css" href="../ace/assets/css/index.css" />
    <script type="text/javascript" src="../ace/assets/js/web.js"></script>
    <link rel="stylesheet" type="text/css" href="../datatable/css/jquery.dataTables.min.css">
    <link rel="stylesheet" href="../ace/assets/css/leftnav.css" media="screen" type="text/css"/>
    
    <link rel="stylesheet" type="text/css" href="../ace/assets/css/font-awesome.min.css">
	<link rel="stylesheet" href="../table/css/animsition.min.css" />
	<link rel="stylesheet" href="../table/css/drop-down.css" />
	<link rel="stylesheet" href="../table/css/common.css" />
	<link rel="stylesheet" href="../table/css/system.css" />
	<link rel="stylesheet" href="../html/css/index-layout.css" />
	<link rel="stylesheet" href="../ace/assets/css/style.css" />
	<link rel="stylesheet" href="css/xcxc.css">
</head>
<body>
<div class="navbar navbar-default" id="navbar">
    <div class="navbar-container" id="navbar-container">
        <div class="navbar-header pull-right" role="navigation">
            <ul class="nav">
                <li class="light-blue">
                    <a data-toggle="dropdown" href="#" class="dropdown-toggle" id="userMenu">
					<img class="nav-user-photo" src="../ace/assets/avatars/user.jpg" alt="Jason's Photo" />
                        <span class="user-info" id="userInfo">欢迎光临</span>
                        <i class="icon-caret-down"></i>
                    </a>
                    <ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
                        <li><a href="#"> <i class="icon-cog"></i> 设置 </a></li>
                        <li><a href="userInfoPage.html"> <i class="icon-user"></i> 个人资料 </a></li>
                        <li class="divider"></li>
                        <li><a href="#" class="logOut"> <i class="icon-off "></i> 退出 </a></li>
                    </ul>
                </li>
            </ul>
            <!-- /.ace-nav -->
        </div>
        <!-- /.navbar-header -->
    </div>
    <!-- /.container -->

</div>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>
     <div id="nav">
        <ul class="w">
            <li class="active"><a href="#index_home">首页</a></li>
            <li><a href="#index_xcfa">巡察方案</a></li>
            <li><a href="#index_xczj">巡察组建</a></li>
            <li><a href="#index_fbjh">发布计划</a></li>
            <li><a href="#index_xcxc">现场巡察</a></li>
            <li><a href="#index_bgfk">报告及反馈</a></li>
            <li><a href="#index_pjkh">评价与考核</a></li>
        </ul>
    </div>
    <div>
        <label>用户姓名</label>
        <label>张三</label>
        <label>用户部门</label>
        <label>某个部门</label>
        <label>用户密码</label>
        <input type="password"/>
        <label>用户头像</label>
        <img class="nav-user-photo" src="../ace/assets/avatars/user.jpg" alt="Jason's Photo" />
        <p>zzz Pikachu Evee</p>
        <label>用户信息</label>
        <button>返回首页</button>
    </div>
</div>
    <script type="text/javascript" src="../ace/assets/js/jquery-1.10.2.min.js"></script>
    <script src="../table/js/jquery-ui.min.js"></script>
    <script src="../table/js/select-widget-min.js"></script>
    <script src="../table/js/jquery.animsition.min.js"></script>
    <script src="../table/js/echarts.min.js"></script>
    <script src="../table/js/macarons .js"></script>
    <script src="../table/js/common.js"></script>
    <script src="./js/userInfoPage.js"></script>

    <script type="text/javascript">
        //banner左侧内容栏
        $(function(){
            var thisTime;
            //鼠标离开左侧内容栏
            $('.cat_wrap .cat_list .float').mouseleave(function(even){
                thisTime = setTimeout(thisMouseOut,1000);
            });
            //鼠标点击左侧内容栏   滑动出弹层
            $('.cat_wrap .cat_list .float').mouseenter(function(){
                $(this).addClass("active").siblings().removeClass("active");
                clearTimeout(thisTime);
                var thisUB = $('.cat_wrap .cat_list .float').index($(this));
                if($.trim($('.cat_subcont .cat_sublist').eq(thisUB).html()) != ""){
                    $('.cat_subcont').addClass('active');
                    $('.cat_subcont').css("top",$(this).context.offsetTop + "px");
                    $('.cat_sublist').hide();
                    $('.cat_sublist').eq(thisUB).show();
                }else{
                    $('.cat_subcont').removeClass('active');
                }
            });
            //函数——执行鼠标离开左侧内容栏的动作
            function thisMouseOut(){
                $('.cat_subcont').removeClass('active');
                $('.cat_wrap .cat_list .float').removeClass('active');
            }
        });
    </script>
    <script type="text/javascript" src="../datatable/js/jquery.dataTables.min.js"></script>
    <script src="../ace/assets/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../layer/layer.js"></script>
    <script type="text/javascript" src="../util/pligins.ext.js"></script>
    <script src="../ace/assets/js/typeahead-bs2.min.js"></script>
    <script type="text/javascript">
		var userId;
		function getUserName(userId) {
			$.ajax({
                type:"GET",
                url:"http://localhost:8080/mm-ssm/user/query",
                dataType: "json",
                data:{
                    id: userId
                },
                success: function (data) {
                    $('#userMenu #userInfo').text('欢迎光临,' + data[0].name);
                },
                error: function (error) {
                    alert("Request error!");
                }
			});
        }
		function getLoginUserInfo() {
		    var cookieStr = document.cookie.toString();
		    var index = cookieStr.indexOf('userId');
		    userId = cookieStr.substr(index).split("=")[1];
		    getUserName(userId);
		    console.log('Welcome,' + userId);
		}
        $(function() {
            getLoginUserInfo();
        });
    </script>
</body>
</html>